using System;
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using DarkDragon.Elements;
using Framework.Scripts.MapData;
using Gj.Galaxy.Logic;
using Gj.MapData;
using Gj.MapData.Strategy;
using SimpleJSON;
using Random = System.Random;

namespace Gj
{
    public class NoticeService : GameService
    {
        public static NoticeService single;
        private Action<string, string, int> action;

        static NoticeService()
        {
            single = new NoticeService();
        }

        public void OnDestroy()
        {
            single = new NoticeService();
        }

        public void OnInit()
        {
        }

        public void OnUpdate()
        {
            
        }

        public void Receive(Action<string, string, int> cb)
        {
            action = cb;
        }

        public void Notice(string type, string category, int value)
        {
            if (action != null) action(type, category, value);
        }
    }
}
